package com.yeban.javase.day16.state.start;

/**
 * @Desc TODO
 * @Author yeban
 * @Date 2025/10/30
 *
 *  新建状态 → 就绪状态
 */
public class StartAndRunnable {
    public static void main(String[] args) {
        Thread t = new Thread(() -> System.out.println("线程运行中"));
        System.out.println(t.getState()); // NEW
        t.start();                        // 从 NEW → RUNNABLE
        System.out.println(t.getState()); // RUNNABLE 或 TERMINATED（取决于执行速度）
    }
}
